Skip to content

When launching core list with no installed platforms print no platforms installed #2238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

alessio-perugini
Copy link
Contributor

@alessio-perugini alessio-perugini commented Jul 4, 2023

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • UPGRADING.md has been updated with a migration guide (for breaking changes)
  • configuration.schema.json updated if new parameters are added.

What kind of change does this PR introduce?

core list command now prints the table headers in the stdout when no platforms are installed

What is the current behavior?

Empty stdout. The only case we show something is when we set the json format flag it returns []

What is the new behavior?

The new behavior if no platforms are installed prints only the table headers.

Does this PR introduce a breaking change, and is titled accordingly?

Other information

The other option we have is to show something like this:

$ arduino-cli core list
No platforms installed.

@alessio-perugini alessio-perugini linked an issue Jul 4, 2023 that may be closed by this pull request
3 tasks
@alessio-perugini alessio-perugini self-assigned this Jul 4, 2023
@alessio-perugini alessio-perugini added the type: enhancement Proposed improvement label Jul 4, 2023
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.05 ⚠️

Comparison is base (fe6d749) 63.02% compared to head (9039dd2) 62.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2238      +/-   ##
==========================================
- Coverage   63.02%   62.98%   -0.05%     
==========================================
  Files         220      220              
  Lines       19499    19506       +7     
==========================================
- Hits        12290    12286       -4     
- Misses       6128     6136       +8     
- Partials     1081     1084       +3     
Flag Coverage Δ
unit 62.98% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/cli/core/list.go 93.61% <ø> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@alessio-perugini alessio-perugini requested a review from cmaglie July 4, 2023 09:25
@per1234 per1234 added topic: code Related to content of the project itself topic: CLI Related to the command line interface labels Jul 5, 2023
@alessio-perugini alessio-perugini merged commit df12786 into master Jul 6, 2023
@alessio-perugini alessio-perugini deleted the 2220-ae-111-core-list-command-gives-no-output-when-no-platforms-are-installed branch July 6, 2023 07:13
@alessio-perugini alessio-perugini changed the title When launching core list with no installed platforms show table headers When launching core list with no installed platforms print no platforms installed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: CLI Related to the command line interface topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

core list command gives no output when no platforms are installed
3 participants